package com.miyu.writenum;

import android.app.Activity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class AboutActivity extends Activity {

    @BindView(R.id.btn1)
    Button btn1;
    @BindView(R.id.btn2)
    Button btn2;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);
        ButterKnife.bind(this);

    }

    @OnClick({R.id.btn1,R.id.btn2})
     void test(View v) {
        switch (v.getId()){
            case R.id.btn1:
                System.out.println("点击按钮1");
                Toast.makeText(this,"点击1按钮",Toast.LENGTH_SHORT).show();
                break;
            case R.id.btn2:
                System.out.println("点击按钮2");
                Toast.makeText(this,"点击2按钮",Toast.LENGTH_SHORT).show();
                break;
            default:
                break;

        }

    }

}
